-- GENERATED SPELL FOR [Mangletooth] --


function spell0_3430(pUnit, Event) --@Agamaggan\'s Agility,n/a--
pUnit:FullCastSpellOnTarget(17013,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3430', 585, 1)
end

function spell1_3430(pUnit, Event) --@Agamaggan\'s Strength,n/a--
pUnit:FullCastSpellOnTarget(16612,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3430', 591, 1)
end

function spell2_3430(pUnit, Event) --@Razorhide,n/a--
pUnit:FullCastSpellOnTarget(16610,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3430', 579, 1)
end

function spell3_3430(pUnit, Event) --@Rising Spirit,n/a--
pUnit:FullCastSpellOnTarget(10767,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3430', 571, 1)
end

function spell4_3430(pUnit, Event) --@Spirit of the Wind,n/a--
pUnit:FullCastSpellOnTarget(16618,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3430', 590, 1)
end

function spell5_3430(pUnit, Event) --@Wisdom of Agamaggan,n/a--
pUnit:FullCastSpellOnTarget(7764,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3430', 567, 1)
end

function Sorts_3430(pUnit, Event)
local choix_sorts_3430 = math.random(0, 5)
if choix_sorts_3430 == 0 then
pUnit:RegisterEvent('spell0_3430', 1, 1)
end
if choix_sorts_3430 == 1 then
pUnit:RegisterEvent('spell1_3430', 1, 1)
end
if choix_sorts_3430 == 2 then
pUnit:RegisterEvent('spell2_3430', 1, 1)
end
if choix_sorts_3430 == 3 then
pUnit:RegisterEvent('spell3_3430', 1, 1)
end
if choix_sorts_3430 == 4 then
pUnit:RegisterEvent('spell4_3430', 1, 1)
end
if choix_sorts_3430 == 5 then
pUnit:RegisterEvent('spell5_3430', 1, 1)
end
end

function mob3430_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3430', math.random(1500, 3000), 1)
end

function mob3430_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3430_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3430_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3430, 1, 'mob3430_Action')
RegisterUnitEvent(3430, 2, 'mob3430_Leave')
RegisterUnitEvent(3430, 3, 'mob3430_Kill')
RegisterUnitEvent(3430, 4, 'mob3430_Die')
